<!DOCTYPE html>
<html>
<head>
    {include file='public/meta'/}

    <script src="/static/js/echarts.min.js" type="text/javascript" charset="utf-8"></script>
</head>
<body>
{include file='public/header'/}
<!------------------导航-------------------------->
<section id="content">
    {include file='public/left'/}
    <!--------------------------主要内容区域------------------------------------->
    <div class="content content_index">
        <style>
            .glyphico {
                position: relative;
                top: 1px;
                display: inline-block;
                font-family: 'Glyphicons Halflings';
                font-style: normal;
                font-weight: 400;
                line-height: 1;
                -webkit-font-smoothing: antialiased;
                -moz-osx-font-smoothing: grayscale;
            }

            .change {
                display: block;
                font-size: 15px;
                line-height: 18px;
                text-decoration: none;
                color: #333
            }

            .shell {
                float: left;
                width: 60%;
            }

            .core {
                height: 18px;
                overflow: hidden;
            }

            .content_index {
                background: rgba(250, 250, 250, 1);
            }

            .notice {
                /*width:1118px;*/
                /*height:66px;*/
                background: rgba(255, 255, 255, 1);
                border-radius: 8px;
                border: 1px solid rgba(231, 232, 242, 1);
                padding-left: 15px;
                border-left: 4px solid rgb(24, 144, 255);
            }

            .notice h3 {
                margin: 0;
                line-height: 40px;
            }

            .notice_title {
                height: 40px;
                font-size: 22px;
                font-weight: 400;
                color: rgba(0, 0, 0, 0.85);
                line-height: 40px;
            }

            .shell {
                padding: 10px;
            }

            .mgb15 {
                margin-bottom: 15px;
            }

            .panel-group .card_box {
                height: 185px;
                cursor: pointer;
                border-radius: 5px;
                border: 1px solid #e4e7ed;
                font-size: 12px;
                position: relative;
                overflow: hidden;
                color: #666;
                background: #fff;
                -webkit-box-shadow: 4px 4px 40px rgba(0, 0, 0, .05);
                box-shadow: 4px 4px 40px rgba(0, 0, 0, .05);
                border: 1px solid rgba(231, 232, 242, 1);
            }

            .panel-group .card_boxs {
                cursor: pointer;
                border-radius: 5px;

                font-size: 12px;
                position: relative;
                overflow: hidden;
                color: #666;
                background: #fff;
                -webkit-box-shadow: 4px 4px 40px rgba(0, 0, 0, .05);
                box-shadow: 4px 4px 40px rgba(0, 0, 0, .05);
                border: 1px solid rgba(231, 232, 242, 1);
            }

            .panel-group .card_box .card_info {
                display: flex;
                color: #fff;
                border-top: 1px solid hsla(0, 0%, 100%, .14);
                height:100px;
            }

            .panel-group .card_boxs .card_infos {
                display: flex;
                color: #33343E;
                border-top: 1px solid hsla(0, 0%, 100%, .14);
            }

            .panel-group .card_box .icon-memnum {
                background: linear-gradient(132deg, rgba(112, 152, 255, 1) 0%, rgba(77, 110, 255, 1) 100%);
            }

            .icon-pay {
                background: linear-gradient(132deg, rgba(255, 163, 105, 1) 0%, rgba(246, 129, 56, 1) 100%);
            }

            .icon-jf {
                background: linear-gradient(132deg, rgba(98, 54, 255, 0.73) 0%, rgba(98, 54, 255, 0.93) 100%);
            }

            .panel-group .card_box .card_info .card_title {
                padding: 15px;
            }

            .panel-group .card_boxs .card_infos .card_title {
                padding: 15px 25px;
            }

            .panel-group .card_box .card_info .card_title_info, .panel-group .card_boxs .card_infos .card_title_info {
                text-align: left;
                margin: 0;
                font-size: 17px;
                line-height: 35px;
            }

            .panel-group .card_box .card_info .card_title_info_sub, .panel-group .card_boxs .card_infos .card_title_info_sub {
                text-align: left;
                margin: 0;
                font-size: 23px;
                line-height: 35px;
                border-bottom: 1px solid hsla(0, 0%, 100%, .14);
            }

            .panel-group .card_boxs .card_infos .card_title_info_sub {
                font-size: 15px;
                line-height: 25px;
                font-weight: 500;
            }

            .panel-group .card_boxs .card_infos .card_title_info {

                border-bottom: 1px solid hsla(0, 0%, 38%, 0.14);
            }

            .panel-group .card_flex {
                text-align: center;
                -webkit-box-flex: 1;
                -ms-flex: 1;
                flex: 1;
            }

            .card_flex {
                flex: 1;
            }

            .card_row {
                display: -webkit-box;
                display: -ms-flexbox;
                display: flex;
            }

            .panel-group .card_box .card_text {
                line-height: 18px;
                color: rgba(0, 0, 0, .45);
                font-size: 13px;
                margin-bottom: 5px;
            }

            .panel-group .card_box .card_num {
                font-size: 20px;
            }

            .card_left {
                float: left;
                padding: 20px;
                position: relative;
            }

            .panel-group .card_box .card_left:after {
                content: " ";
                position: absolute;
                right: 0;
                top: 20px;
                width: 1px;
                bottom: 20px;
                border-right: 1px solid rgba(0, 0, 0, .1);
            }

            .card_description {
                padding: 20px;
                margin-left: 0;
            }

            .card_icon {
                width: 60px;
                height: auto;
            }

            .p20 {
                padding: 20px;
            }

            .cards_left {
                text-align: center;
                border-right: 1px solid rgba(231, 232, 242, 1);
            }

            .cards_left img {
                width: 80%;
            }

            /*    卡券*/
            .content .coupon {
                margin: 10px;
                background: rgba(255, 255, 255, 1);
                border-radius: 5px;
                border: 1px solid rgba(231, 232, 242, 1);
            }

            .coupon .panel-headings {
                padding: 10px 20px;
                border-bottom: 1px solid rgba(231, 232, 242, 1);
            }

            .coupon .panel-headings h5 {
                width: 130px;
                height: 20px;
                font-size: 13px;
                font-weight: 500;
                color: rgba(105, 105, 106, 1);
                line-height: 20px;
                display: inline-block;
            }

            .fr_text {
                float: right;
                font-size: 13px;
                color: rgba(105, 105, 106, 1);
            }

            .index-left-style:after {
                content: " ";
                position: absolute;
                right: 0;
                top: 20px;
                width: 1px;
                bottom: 20px;
                border-right: 1px dashed rgba(0, 0, 0, .1);
            }

            .today {
                background: rgba(97, 134, 255, 1);
            }

            .todates {
                background: rgba(246, 129, 56, 1);
            }

            .todate_title {
                width: 40px;
                height: 25px;
                border-radius: 2px;
                font-size: 12px;
                color: rgba(255, 255, 255, 1);
                line-height: 20px;
                padding: 3px 5px;
                margin-left: 38px;
            }

            .todate {
                padding: 3px 5px;
                font-size: 14px;
                color: rgba(105, 105, 106, 1);
                line-height: 20px;
            }

            .coupon_info {
                padding: 20px;
                text-align: center;
            }

            .border-r:after {
                content: " ";
                position: absolute;
                right: 0;
                top: 20px;
                width: 1px;
                bottom: 20px;
                border-right: 1px solid rgba(0, 0, 0, .1);
            }

            .coupon_info .card_text {
                font-size: 13px;
                font-weight: 400;
                color: rgba(37, 35, 58, 1);
                line-height: 21px;
            }

            .coupon_info .card_num {
                font-size: 16px;
                font-weight: 500;
                color: rgba(37, 35, 58, 1);
                line-height: 32px;
            }

            .tab_kj {
                position: relative;
            }

            .position_r {
                position: absolute;
                top: 10px;
                right: 20px;
            }

            .tab_kj #myTab > li {
                padding: 10px 20px;
            }

            .tab_kj #myTab > li > a {
                font-size: 13px;
                font-weight: 500;
                color: rgba(105, 105, 106, 1);
                line-height: 20px;
            }

            .tab_kj #myTab > li.active > a {
                color: #2db7f5 !important;
            }

            #myTabContent .kj_path img {
                width: 133px;
                height: auto;
            }

            .kj_path {
                background: linear-gradient(132deg, rgba(255, 80, 80, 1) 0%, rgba(255, 105, 105, 1) 100%);
                border-radius: 5px;
                color: #fff;
                margin-bottom: 10px;
                height: 117px;
            }

            .kj_path a {
                color: #fff;
            }

            .kj_blue {
                background: linear-gradient(132deg, rgba(112, 152, 255, 1) 0%, rgba(77, 110, 255, 1) 100%);
            }

            .kj_Violet {
                background: linear-gradient(132deg, rgba(98, 54, 255, 0.75) 0%, rgba(136, 102, 255, 1) 100%);
            }

            .kj_yellow {
                background: linear-gradient(132deg, rgba(247, 181, 0, 0.55) 0%, rgba(255, 205, 68, 1) 100%);
            }

            .kj_orange {
                background: linear-gradient(132deg, rgba(250, 100, 0, 1) 0%, rgba(246, 129, 56, 1) 100%);
            }

            .kj_Pink {
                background: linear-gradient(132deg, rgba(255, 80, 80, 1) 0%, rgba(255, 105, 105, 1) 100%);
            }

            .kj_lakeblue {
                background: linear-gradient(132deg, rgba(56, 199, 255, 0.7) 0%, rgba(56, 199, 255, 1) 100%);
            }

            .kj_cyan {
                background: linear-gradient(132deg, rgba(102, 200, 109, 0.62) 0%, rgba(102, 200, 109, 1) 100%);
            }

            .kj_title {
                font-size: 17px;
            }

            .kj_title_sub {
                font-size: 13px;
            }

            .tbodys tr:nth-child(1) .ranking:first-child {
                color: #FA6400;
            }

            .tbodys tr:nth-child(2) .ranking:first-child {
                color: #0091FF;
            }

            .tbodys tr:nth-child(3) .ranking:first-child {
                color: #09BB07;
            }

            .orange {
                color: #F7B500;
            }
        </style>

        <div class=" panel-default mgl15 mgr15 mgb15 notice">
            <div class="notice_title">
                <h3 class="" style="float: left;width:8%;">
                    <a href="{:url('index/changemlog')}" target="_blank">
                        <span class="glyphico glyphicon-volume-up" style="color:#4A94FF"></span>
                        <span>公告</span></a>


                </h3>

                <div class="shell">
                    <div id="div4" class="core">
                        {volist name="notice" id="vo"}
                        <a title="点击查看" class="change" target="_blank" href="javascript:void(0)" data-id="{$vo['id']}"
                           onclick="noticeshow(this)" style="color:#25233a">【{$vo['addtime']|date="Y-m-d",###}】{$vo['title']}<span
                                style="color: #2db7f5;margin:0 5px;">[查看详情]</span></a>

                        {/volist}
                    </div>
                </div>
            </div>
        </div>
        <div class="panel-group clearfix">
            <div class="col-md-4 col-xs-4 col-sm-6">
                <div class="card_box">
                    <div class="card_info icon-memnum">
                        <div class="card_flex card_title">
                            <div class="card_title_info">会员总数</div>
                            <div class="card_title_info_sub">
                                <text id="m_total_num"></text>
                                人
                            </div>
                        </div>
                        <div class="card_flex p20"><img class="card_icon" style=""
                                                        src="__STATIC_URL__/static/shouye/members.png"/></div>
                    </div>
                    <div class="card_row">
                        <div class="card_flex card_left">
                            <div class="card_text ">新增会员</div>
                            <div class="card_num" id="m_rec_user_num">0</div>
                        </div>
                        <div class="card_flex card_left ">
                            <div class="card_text">男性会员</div>
                            <div class="card_num" id="m_male_num">0</div>
                        </div>
                        <div class="card_flex card_description">
                            <div class="card_text">女性会员</div>
                            <div class="card_num" id="m_female_num">0</div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="col-md-4 col-xs-4 col-sm-6">
                <div class="card_box">
                    <div class="card_info icon-pay">
                        <div class="card_flex card_title">
                            <div class="card_title_info">充值总额</div>
                            <div class="card_title_info_sub">￥
                                <text id="cz_total_rec_num"></text>
                            </div>
                        </div>
                        <div class="card_flex p20"><img class="card_icon" style=""
                                                        src="__STATIC_URL__/static/shouye/recharges.png"/></div>
                    </div>
                    <div class="card_row">
                        <div class="card_flex card_left">
                            <div class="card_text ">消费金额</div>
                            <div class="card_num">￥
                                <text id="cz_total_con_num"></text>
                            </div>
                        </div>
                        <div class="card_flex card_description ">
                            <div class="card_text">剩余金额</div>
                            <div class="card_num">￥
                                <text id="cz_total_surplus_num"></text>
                            </div>
                        </div>

                    </div>
                </div>
            </div>
            <div class="col-md-4 col-xs-4 col-sm-6">
                <div class="card_box">
                    <div class="card_info icon-jf">
                        <div class="card_flex card_title">
                            <div class="card_title_info">积分总额</div>
                            <div class="card_title_info_sub">
                                <text id="jf_total_rec_num"></text>
                                分
                            </div>
                        </div>
                        <div class="card_flex p20 card_left">
                            <img class="card_icon" style="" src="__STATIC_URL__/static/shouye/integrals.png"/>
                        </div>
                    </div>
                    <div class="card_row">
                        <div class="card_flex card_left">
                            <div class="card_text ">消费积分</div>
                            <div class="card_num">
                                <text id="jf_total_con_num"></text>
                            </div>
                        </div>
                        <div class="card_flex card_description ">
                            <div class="card_text">剩余积分</div>
                            <div class="card_num">
                                <text id="jf_total_surplus_num"></text>
                            </div>
                        </div>

                    </div>
                </div>
            </div>
        </div>
        <div class="panel-group clearfix">
            <div class="col-md-4 col-xs-4 col-sm-6">
                <div class="card_boxs">
                    <div class="card_infos">
                        <div class="col-md-3 p20 cards_left"><img class="card_icon" style=""
                                                                  src="__STATIC_URL__/static/shouye/univalent_deal.png"/>
                        </div>

                        <div class="col-md-8 card_title">
                            <div class="card_title_info_sub">平均客单价</div>
                            <div class="card_title_info">￥
                                <text id="average_fee"></text>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="col-md-4 col-xs-4 col-sm-6">
                <div class="card_boxs">
                    <div class="card_infos">
                        <div class="col-md-3 p20 cards_left">
                            <img class="card_icon" style="" src="__STATIC_URL__/static/shouye/month.png"/>
                        </div>

                        <div class="col-md-8 card_title">
                            <div class="card_title_info_sub">当月交易额（元）</div>
                            <div class="card_title_info">￥
                                <text id="month_total_fee"></text>
                            </div>
                        </div>
                    </div>

                </div>
            </div>
            <div class="col-md-4 col-xs-4 col-sm-6">
                <div class="card_boxs">
                    <div class="card_infos">
                        <div class="col-md-3 p20 cards_left">
                            <img class="card_icon" style="" src="__STATIC_URL__/static/shouye/year_business.png"/>
                        </div>

                        <div class="col-md-8 card_title">
                            <div class="card_title_info_sub">年营业额（元）</div>
                            <div class="card_title_info">￥
                                <text id="year_total_fee"></text>
                            </div>
                        </div>
                    </div>

                </div>
            </div>
        </div>
        <div class="panel coupon">

            <div class="panel-headings">
                <h5 class="panel-title">
                    <span>卡券概览统计</span>

                </h5>
<!--                <span class="fr_text">更多 <span class="glyphicon glyphicon-chevron-right"></span></span>-->
            </div>
            <div class="information panel-body">
                <div class="col-md-6 col-xs-6 col-sm-12 index-left-style">
                    <div>
                        <span class="today todate_title">今天</span>
                        <span class="todate" id="todate"></span>
                    </div>
                    <div class=" col-sm-4">
                        <div class="card_row border-r">

                            <div class="card_flex coupon_info ">
                                <div class="card_text">领取</div>
                                <div class="card_num" id="get_num"></div>
                            </div>
                            <div class="card_flex coupon_info">
                                <div class="card_text">核销</div>
                                <div class="card_num" id="con_num"></div>
                            </div>
                        </div>
                    </div>
                    <div class=" col-sm-8">
                        <div class="card_row">
                            <div class="card_flex coupon_info">
                                <div class="card_text ">购买数量</div>
                                <div class="card_num" id="pay_num"></div>
                            </div>
                            <div class="card_flex coupon_info ">
                                <div class="card_text">购买金额</div>
                                <div class="card_num" id="pay_fee"></div>
                            </div>
                            <div class="card_flex coupon_info">
                                <div class="card_text">核销金额</div>
                                <div class="card_num" id="con_fee"></div>
                            </div>
                        </div>
                    </div>


                </div>
                <div class="col-md-6 col-sm-6 col-xs-12">
                    <div>
                        <span class="todates todate_title">本周</span>
                        <span class="todate" id="date7"></span>
                    </div>
                    <div class=" col-sm-4">
                        <div class="card_row border-r">

                            <div class="card_flex coupon_info ">
                                <div class="card_text">领取</div>
                                <div class="card_num" id="get_num7"></div>
                            </div>
                            <div class="card_flex coupon_info">
                                <div class="card_text">核销</div>
                                <div class="card_num" id="con_num7"></div>
                            </div>
                        </div>
                    </div>
                    <div class=" col-sm-8">
                        <div class="card_row">
                            <div class="card_flex coupon_info">
                                <div class="card_text ">购买数量</div>
                                <div class="card_num" id="pay_num7"></div>
                            </div>
                            <div class="card_flex coupon_info ">
                                <div class="card_text">购买金额</div>
                                <div class="card_num" id="pay_fee7"></div>
                            </div>
                            <div class="card_flex coupon_info">
                                <div class="card_text">核销金额</div>
                                <div class="card_num" id="con_fee7"></div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>

        </div>

        <div class="clearfix" style="width: auto;">
            <div class="col-sm-12 col-xs-6 col-md-6" style="padding-left:0px;padding-right:0px;">
                <div class="panel coupon">
                    <div class="panel-headings">
                        <h5 class="panel-title">
                            <span>营业额统计（周）</span>

                        </h5>
<!--                        <span class="fr_text"> <span class="glyphicon glyphicon-chevron-right"></span></span>-->
                    </div>
                    <div class="information panel-body">
                        <div class="">
                            <!-- 为ECharts准备一个具备大小（宽高）的Dom -->
                            <div id="main" class="col-md-12 col-sm-12 col-xs-12" style="height:350px;"></div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="col-md-6 col-sm-6 col-xs-12" style="padding-left:0px;padding-right:0px;">
                <div class="panel coupon" style="    height: 423px;">
                    <div class="panel-headings">
                        <h5 class="panel-title">
                            <span>会员消费排行榜</span>

                        </h5>
<!--                        <a style="float:right" class="fr_text" href="{:url('Pay/paylog')}"> <span-->
<!--                                class="glyphicon glyphicon-chevron-right"></span></a>-->
                    </div>
                    <div class="information panel-body">
                        <table class="table table-bordered index-bottom-table" id="member_body">

                            <thead>
                            <tr class="">
                                <th>消费榜单</th>
                                <th>会员名称</th>
                                <th>消费金额</th>
                            </tr>
                            </thead>
                            <tbody class="tbodys">

                            </tbody>
                        </table>
                    </div>
                </div>
            </div>
        </div>
        <div class="panel coupon">
            <div class="tab_kj">
                <ul id="myTab" class="nav nav-tabs">
                    <li class="active"><a href="#sediment" data-toggle="tab">
                        <span class="glyphicon glyphicon-sort-by-attributes"></span>沉淀会员</a></li>
                    <li><a href="#promote" data-toggle="tab"><span class="glyphicon glyphicon-hdd"></span>提升储值</a>
                    </li>
                    <li><a href="#operate" data-toggle="tab"><span class="glyphicon glyphicon-list	"></span>运营管理</a>
                    </li>
                    <li><a href="#repeat" data-toggle="tab"><span class="glyphicon glyphicon-circle-arrow-up"></span>提升复购</a>
                    </li>
                    <li><a href="#member" data-toggle="tab"><span
                            class="glyphicon glyphicon-heart-empty"></span>管理会员</a>
                    </li>
                </ul>
<!--                <a class="position_r" href="{:url('Pay/paylog')}"> <span-->
<!--                        class="glyphicon glyphicon-chevron-right"></span></a>-->
            </div>
            <div class="information panel-body">
                <div id="myTabContent" class="tab-content">
                    <div class="tab-pane fade in active clearfix" id="sediment">
                        {if condition="checkPath('marke/paycard')"}
                        <div class="col-md-4 col-sm-6 col-xs-6 ">
                            <div class="kj_path">
                                <a href="{:url('marke/paycard')}">
                                    <div class="col-md-5 col-xs-5 col-sm-5">
                                        <img src="__STATIC_URL__/static/images/01.png" alt=""
                                             class="card-img-top img-fluid">
                                    </div>
                                    <div class="col-md-7 col-xs-7 col-sm-7 p20">
                                        <p class="kj_title">支付即会员</p>
                                        <p class="kj_title_sub">支付后即可领取会员</p>
                                    </div>
                                </a>
                            </div>
                        </div>
                        {/if}
                        {if condition="checkPath('marke/masscard')"}
                        <div class="col-md-4 col-sm-6 col-xs-6 ">
                            <div class="kj_path kj_blue">
                                <a href="{:url('marke/masscard')}">
                                    <div class="col-md-5 col-xs-5 col-sm-5">
                                        <img src="__STATIC_URL__/static/images/02.png" alt=""
                                             class="card-img-top img-fluid">
                                    </div>
                                    <div class="col-md-7 col-xs-7 col-sm-7 p20">
                                        <p class="kj_title">卡券群发</p>
                                        <p class="kj_title_sub">向领卡会员赠送卡券</p>
                                    </div>
                                </a>
                            </div>
                        </div>
                        {/if}
                        {if condition="checkPath('marke/paymentputcardslist')"}
                        <div class="col-md-4 col-sm-6 col-xs-6 ">
                            <div class="kj_path kj_Violet">
                                <a href="{:url('marke/paymentputcardslist')}">
                                    <div class="col-md-5 col-xs-5 col-sm-5">
                                        <img src="__STATIC_URL__/static/images/12.png" alt=""
                                             class="card-img-top img-fluid">
                                    </div>
                                    <div class="col-md-7 col-xs-7 col-sm-7 p20">
                                        <p class="kj_title">支付后送券</p>
                                        <p class="kj_title_sub">用户支付后送券</p>
                                    </div>
                                </a>
                            </div>
                        </div>
                        {/if}
                        {if condition="checkPath('marke/birthdaycare')"}
                        <div class="col-md-4 col-sm-6 col-xs-6 ">
                            <div class="kj_path kj_yellow">
                                <a href="{:url('marke/birthdaycare')}">
                                    <div class="col-md-5 col-xs-5 col-sm-5">
                                        <img src="__STATIC_URL__/static/images/28.png" alt=""
                                             class="card-img-top img-fluid">
                                    </div>
                                    <div class="col-md-7 col-xs-7 col-sm-7 p20">
                                        <p class="kj_title">生日关怀</p>
                                        <p class="kj_title_sub">用户生日自动送券</p>
                                    </div>
                                </a>
                            </div>
                        </div>
                        {/if}
                        {if condition="checkPath('marke/freecardslist')"}
                        <div class="col-md-4 col-sm-6 col-xs-6 ">
                            <div class="kj_path kj_orange">
                                <a href="{:url('marke/freecardslist')}">
                                    <div class="col-md-5 col-xs-5 col-sm-5">
                                        <img src="__STATIC_URL__/static/images/21.png" alt=""
                                             class="card-img-top img-fluid">
                                    </div>
                                    <div class="col-md-7 col-xs-7 col-sm-7 p20">
                                        <p class="kj_title">免费券</p>
                                        <p class="kj_title_sub">用户可以免费领取的券</p>
                                    </div>
                                </a>
                            </div>
                        </div>
                        {/if}
                        {if condition="checkPath('marke/firegive')"}
                        <div class="col-md-4 col-sm-6 col-xs-6 ">
                            <div class="kj_path kj_Pink">
                                <a href="{:url('marke/firegive')}">
                                    <div class="col-md-5 col-xs-5 col-sm-5">
                                        <img src="__STATIC_URL__/static/images/22.png" alt=""
                                             class="card-img-top img-fluid">
                                    </div>
                                    <div class="col-md-7 col-xs-7 col-sm-7 p20">
                                        <p class="kj_title">开卡送券</p>
                                        <p class="kj_title_sub">向领取激活会员卡的会员发放卡券奖励</p>
                                    </div>
                                </a>
                            </div>
                        </div>
                        {/if}


                    </div>
                    <div class="tab-pane fade clearfix" id="promote">
                        {if condition="checkPath('cardus/storagegl')"}
                        <div class="col-md-4 col-sm-6 col-xs-6 ">
                            <div class="kj_path kj_lakeblue">
                                <a href="{:url('cardus/storagegl')}">
                                    <div class="col-md-5 col-xs-5 col-sm-5">
                                        <img src="__STATIC_URL__/static/images/19.png" alt=""
                                             class="card-img-top img-fluid">
                                    </div>
                                    <div class="col-md-7 col-xs-7 col-sm-7 p20">
                                        <p class="kj_title">储值管理</p>
                                        <p class="kj_title_sub">在线充值的储值规程</p>
                                    </div>
                                </a>
                            </div>
                        </div>
                        {/if}
                    </div>
                    <div class="tab-pane fade clearfix" id="operate">
                        {if condition="checkPath('cardus/activezd')"}
                        <div class="col-md-4 col-sm-6 col-xs-6 ">
                            <div class="kj_path kj_Violet">
                                <a href="{:url('cardus/activezd')}">
                                    <div class="col-md-5 col-xs-5 col-sm-5">
                                        <img src="__STATIC_URL__/static/images/20.png" alt=""
                                             class="card-img-top img-fluid">
                                    </div>
                                    <div class="col-md-7 col-xs-7 col-sm-7 p20">
                                        <p class="kj_title">激活字段</p>
                                        <p class="kj_title_sub">用户开卡时需要的字段</p>
                                    </div>
                                </a>
                            </div>
                        </div>
                        {/if}
                        {if condition="checkPath('marke/followputcards')"}
                        <div class="col-md-4 col-sm-6 col-xs-6 ">
                            <div class="kj_path kj_blue">
                                <a href="{:url('marke/followputcards')}">
                                    <div class="col-md-5 col-xs-5 col-sm-5">
                                        <img src="__STATIC_URL__/static/images/26.png" alt=""
                                             class="card-img-top img-fluid">
                                    </div>
                                    <div class="col-md-7 col-xs-7 col-sm-7 p20">
                                        <p class="kj_title">关注送券</p>
                                        <p class="kj_title_sub">新用户关注可以获得的券</p>
                                    </div>
                                </a>
                            </div>
                        </div>
                        {/if}
                        {if condition="checkPath('marke/gamcash')"}
                        <div class="col-md-4 col-sm-6 col-xs-6 ">
                            <div class="kj_path kj_lakeblue">
                                <a href="{:url('marke/gamcash')}">
                                    <div class="col-md-5 col-xs-5 col-sm-5">
                                        <img src="__STATIC_URL__/static/images/23.png" alt=""
                                             class="card-img-top img-fluid">
                                    </div>
                                    <div class="col-md-7 col-xs-7 col-sm-7 p20">
                                        <p class="kj_title">社交立减金</p>
                                        <p class="kj_title_sub">裂变营销。</p>
                                    </div>
                                </a>
                            </div>
                        </div>
                        {/if}
                        {if condition="checkPath('marke/wxputsetup')"}
                        <div class="col-md-4 col-sm-6 col-xs-6 ">
                            <div class="kj_path">
                                <a href="{:url('marke/wxputsetup')}">
                                    <div class="col-md-5 col-xs-5 col-sm-5">
                                        <img src="__STATIC_URL__/static/images/30.png" alt=""
                                             class="card-img-top img-fluid">
                                    </div>
                                    <div class="col-md-7 col-xs-7 col-sm-7 p20">
                                        <p class="kj_title">关注通知</p>
                                        <p class="kj_title_sub">新用户关注后，推送领券图文消息。</p>
                                    </div>
                                </a>
                            </div>
                        </div>
                        {/if}

                    </div>
                    <div class="tab-pane fade clearfix" id="repeat">
                        {if condition="checkPath('marke/paypurcardslist')"}
                        <div class="col-md-4 col-sm-6 col-xs-6 ">
                            <div class="kj_path kj_Violet">
                                <a href="{:url('marke/paypurcardslist')}">
                                    <div class="col-md-5 col-xs-5 col-sm-5">
                                        <img src="__STATIC_URL__/static/images/11.png" alt=""
                                             class="card-img-top img-fluid">
                                    </div>
                                    <div class="col-md-7 col-xs-7 col-sm-7 p20">
                                        <p class="kj_title">付费券</p>
                                        <p class="kj_title_sub">用户付费可以购买的券</p>
                                    </div>
                                </a>
                            </div>
                        </div>
                        {/if}
                        {if condition="checkPath('marke/machputcards')"}
                        <div class="col-md-4 col-sm-6 col-xs-6 ">
                            <div class="kj_path">
                                <a href="{:url('marke/machputcards')}">
                                    <div class="col-md-5 col-xs-5 col-sm-5">
                                        <img src="__STATIC_URL__/static/images/14.png" alt=""
                                             class="card-img-top img-fluid">
                                    </div>
                                    <div class="col-md-7 col-xs-7 col-sm-7 p20">
                                        <p class="kj_title">本商户优惠券</p>
                                        <p class="kj_title_sub">用户在微信端我的优惠券里可以领取</p>
                                    </div>
                                </a>
                            </div>
                        </div>
                        {/if}
                    </div>
                    <div class="tab-pane fade clearfix" id="member">
                        {if condition="checkPath('shop/shopmall')"}
                        <div class="col-md-4 col-sm-6 col-xs-6 ">
                            <div class="kj_path kj_blue">
                                <a href="{:url('shop/shopmall')}">
                                    <div class="col-md-5 col-xs-5 col-sm-5">
                                        <img src="__STATIC_URL__/static/images/20.png" alt=""
                                             class="card-img-top img-fluid">
                                    </div>
                                    <div class="col-md-7 col-xs-7 col-sm-7 p20">
                                        <p class="kj_title">积分商城</p>
                                        <p class="kj_title_sub">积分兑换礼品的设置</p>
                                    </div>
                                </a>
                            </div>
                        </div>
                        {/if}
                        {if condition="checkPath('cardus/ranklist')"}
                        <div class="col-md-4 col-sm-6 col-xs-6 ">
                            <div class="kj_path">
                                <a href="{:url('cardus/ranklist')}">
                                    <div class="col-md-5 col-xs-5 col-sm-5">
                                        <img src="__STATIC_URL__/static/images/01.png" alt=""
                                             class="card-img-top img-fluid">
                                    </div>
                                    <div class="col-md-7 col-xs-7 col-sm-7 p20">
                                        <p class="kj_title">会员等级</p>
                                        <p class="kj_title_sub">会员卡等级的设置</p>
                                    </div>
                                </a>
                            </div>
                        </div>
                        {/if}
                        {if condition="checkPath('cardus/qrcodelist')"}
                        <div class="col-md-4 col-sm-6 col-xs-6 ">
                            <div class="kj_path kj_cyan">
                                <a href="{:url('cardus/qrcodelist')}">
                                    <div class="col-md-5 col-xs-5 col-sm-5">
                                        <img src="__STATIC_URL__/static/images/03.png" alt=""
                                             class="card-img-top img-fluid">
                                    </div>
                                    <div class="col-md-7 col-xs-7 col-sm-7 p20">
                                        <p class="kj_title">渠道二维码</p>
                                        <p class="kj_title_sub">渠道二维码的列表获取</p>
                                    </div>
                                </a>
                            </div>
                        </div>
                        {/if}
                        {if condition="checkPath('cardus/cardjclist')"}
                        <div class="col-md-4 col-sm-6 col-xs-6 ">
                            <div class="kj_path kj_orange">
                                <a href="{:url('cardjc/cardjclist')}">
                                    <div class="col-md-5 col-xs-5 col-sm-5">
                                        <img src="__STATIC_URL__/static/images/07.png" alt=""
                                             class="card-img-top img-fluid">
                                    </div>
                                    <div class="col-md-7 col-xs-7 col-sm-7 p20">
                                        <p class="kj_title">计次卡</p>
                                        <p class="kj_title_sub">可以会员购买的次卡</p>
                                    </div>
                                </a>
                            </div>
                        </div>
                        {/if}
                    </div>
                </div>
            </div>
        </div>
        {include file='public/footer'/}
    </div>
</section>

<!-- 公告模态框（Modal） -->
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
                <h4 class="modal-title">系统公告</h4>
            </div>
            <div class="modal-body">
                <div id="noticeinfotitle" style="text-align: center;font-size: 18px"></div>
                <div id="noticeinfo" style="margin-top: 40px;padding: 20px"></div>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
            </div>
        </div><!-- /.modal-content -->
    </div><!-- /.modal-dialog -->
</div>
<!-- /.modal -->
</body>
<script>
    $(function () {
        $('a[data-toggle="tab"]').on('shown.bs.tab', function (e) {
            // 获取已激活的标签页的名称
            var activeTab = $(e.target).text();
            // 获取前一个激活的标签页的名称
            var previousTab = $(e.relatedTarget).text();
            $(".active-tab span").html(activeTab);
            $(".previous-tab span").html(previousTab);
        });
    });
</script>
<script>
    var member_url = "{:url('statis/member_num')}"
    var statis_balance = "{:url('statis/statis_balance_num')}"
    var statis_bonus = "{:url('statis/statis_bonus_num')}"
    var statis_payfee = "{:url('statis/statis_payfee')}"
    var cards_overview = "{:url('statis/cards_overview')}"
    var member_payranking = "{:url('statis/member_payranking')}"
    var turnover_statis = "{:url('statis/turnover_statis')}"
    $(function () {
        getmember_num()
        getstatis_bonus_num()
        getstatis_balance_num()
        getstatis_payfee()
        getmember_payranking()
        var now = new Date();
        var now7 = new Date((+now) - 7 * 24 * 3600 * 1000);
        var time = now.getFullYear() + "-" + ((now.getMonth() + 1) < 10 ? "0" : "") + (now.getMonth() + 1) + "-" + (now.getDate() < 10 ? "0" : "") + now.getDate();
        var time7 = now7.getFullYear() + "-" + ((now7.getMonth() + 1) < 10 ? "0" : "") + (now7.getMonth() + 1) + "-" + (now7.getDate() < 10 ? "0" : "") + now7.getDate();
        $("#todate").text(time)
        $("#date7").text(time7 + "至" + time)
        getcards_overview(1, time, time)
        getcards_overview(2, time7, time)
        getturnover_statis()
    })

    function getmember_num() {
        $.ajax({
            url: member_url,
            type: "post",
            async: true,
            data: {},
            success: function (data) {
                $("#m_total_num").text(data.data.item.total_num)
                $("#m_male_num").text(data.data.item.male_num)
                $("#m_female_num").text(data.data.item.female_num)
                $("#m_rec_user_num").text(data.data.item.rec_user_num)
            }
        })
    }

    function getstatis_bonus_num() {
        $.ajax({
            url: statis_bonus,
            type: "post",
            async: true,
            data: {},
            success: function (data) {
                $("#jf_total_con_num").text(data.data.item.total_con_num)
                $("#jf_total_rec_num").text(data.data.item.total_rec_num)
                $("#jf_total_surplus_num").text(data.data.item.total_surplus_num)

            }
        })
    }

    function getstatis_balance_num() {
        $.ajax({
            url: statis_balance,
            type: "post",
            async: true,
            data: {},
            success: function (data) {
                $("#cz_total_con_num").text(data.data.item.total_con_num)
                $("#cz_total_rec_num").text(data.data.item.total_rec_num)
                $("#cz_total_surplus_num").text(data.data.item.total_surplus_num)
            }
        })
    }

    function getstatis_payfee() {
        $.ajax({
            url: statis_payfee,
            type: "post",
            async: true,
            data: {},
            success: function (data) {
                $("#average_fee").text(data.data.item.average_fee)
                $("#month_total_fee").text(data.data.item.month_total_fee)
                $("#year_total_fee").text(data.data.item.year_total_fee)
            }
        })
    }

    function getcards_overview(type, start_day, end_day) {
        $.ajax({
            url: cards_overview,
            type: "post",
            async: true,
            data: {
                start_day: start_day,
                end_day: end_day
            },
            success: function (data) {
                if (type == 1) {
                    $("#con_fee").text(data.data.item.con_fee)
                    $("#con_num").text(data.data.item.con_num)
                    $("#get_num").text(data.data.item.get_num)
                    $("#pay_fee").text(data.data.item.pay_fee)
                    $("#pay_num").text(data.data.item.pay_num)
                } else {
                    $("#con_fee7").text(data.data.item.con_fee)
                    $("#con_num7").text(data.data.item.con_num)
                    $("#get_num7").text(data.data.item.get_num)
                    $("#pay_fee7").text(data.data.item.pay_fee)
                    $("#pay_num7").text(data.data.item.pay_num)
                }

            }
        })
    }
    function getturnover_statis () {
        $.ajax({
            url: turnover_statis,
            type: "post",
            async: true,
            data: {},
            success: function (data) {
                getturnover(data.data.items.mychart)
            }
        })

    }
    function getmember_payranking() {
        $.ajax({
            url: member_payranking,
            type: "post",
            async: true,
            data: {},
            success: function (data) {
                var str = '', Items = data.data.item

                $.each(Items, function (i, item) {
                    console.log(item)
                    str = "   <tr>\n" +
                        "       <td class='ranking'>" +  item.sort + "</td>\n" +
                        "       <td>" +  item.nickname + "</td>\n" +
                        "       <td class='orange'>" +  item.price + "</td>\n" +
                        "    </tr>";

                    $('#member_body tbody').append(str);

                });
            }
        })
    }
</script>
<script type="text/javascript">
    // 基于准备好的dom，初始化echarts实例
    var setoption1 = null;
    function getturnover(data) {
        var newdata = data;
        setoption1 = setOption1(newdata);
        myChart1.setOption(setoption1);
        myChart1.resize();
    }

    var myChart1 = echarts.init(document.getElementById('main'));

    function setOption1(newData) {
        option = {
            backgroundColor: "#fff",
            title: {
                top: '20',
                left: '50%',
                textAlign: 'center',
                textStyle: {
                    fontSize: 14,
                    fontWeight: '600',
                    color: '#333'
                },
                text: '周营业总额' + '（' + '元' + '）'
            },
            grid: {
                left: '30',
                right: '0',
                top: '64',
                bottom: '64'
            },
            tooltip: {
                trigger: 'item',
                confine: true,
                formatter: "{b}" + "{a}" + '' + " : {c}" + ''
            },
            legend: {
                show: true,
                bottom: 10
            },
            xAxis: [{
                type: 'category',
                data: newData.year,
                axisPointer: {
                    type: 'shadow'
                },
                axisLine: {
                    show: true,
                    lineStyle: {
                        color: '#333'
                    }
                },
                axisLabel: {
                    show: true,
                    color: '#333'
                },
                axisTick: {
                    show: false
                }
            }],
            yAxis: [{
                type: 'value',
                splitNumber: 5,
                splitLine: {
                    show: true,
                    lineStyle: {
                        color: '#eee'
                    }
                },
                axisLine: {
                    show: false
                },
                axisTick: {
                    show: false
                }
            }],
            series: [{
                name: '营业额',
                type: 'line',
                symbol: 'circle',
                areaStyle: {
                    color: {
                        type: 'linear',
                        x: 0,
                        y: 0,
                        x2: 0,
                        y2: 1,
                        colorStops: [{
                            offset: 0,
                            color: 'rgba(47,194,91,0.4)' // 0% 处的颜色
                        }, {
                            offset: 1,
                            color: 'rgba(47,194,91,0.1)' // 100% 处的颜色
                        }]
                    }
                },
                itemStyle: {
                    normal: {
                        color: 'rgba(47,194,91)'
                    }
                },
                data:newData.series[0].data
            },
                {
                    name: '订单数',
                    type: 'line',
                    symbol: 'circle',
                    areaStyle: {
                        color: {
                            type: 'linear',
                            x: 0,
                            y: 0,
                            x2: 0,
                            y2: 1,
                            colorStops: [{
                                offset: 0,
                                color: 'rgb(49,150,250,0.4)' // 0% 处的颜色
                            }, {
                                offset: 1,
                                color: 'rgba(49,150,250,0.1)' // 100% 处的颜色
                            }]
                        }
                    },
                    itemStyle: {
                        normal: {
                            color: 'rgb(49,150,250)'
                        }
                    },
                    data: newData.series[1].data
                },
                {
                    name: '新增会员',
                    type: 'line',
                    symbol: 'circle',
                    areaStyle: {
                        color: {
                            type: 'linear',
                            x: 0,
                            y: 0,
                            x2: 0,
                            y2: 1,
                            colorStops: [{
                                offset: 0,
                                color: 'rgba(250,189,105,0.4)' // 0% 处的颜色
                            }, {
                                offset: 1,
                                color: 'rgba(250,151,53,0.1)' // 100% 处的颜色
                            }]
                        }
                    },
                    itemStyle: {
                        normal: {
                            color: 'rgb(250,161,64)'
                        }
                    },
                    data: newData.series[2].data
                }
            ]
        };
        return option;

    }



</script>
<script src="__STATIC_URL__/static/js/commen.js" type="text/javascript" charset="utf-8"></script>
<script>
    function noticeshow(obj) {
        $.ajax({
            url: "{:url('pub/getnoticeinfo')}",
            type: "post",
            async: true,
            data: {
                id: $(obj).attr('data-id'),
            },
            success: function (data) {
                $('#noticeinfotitle').text(data.title);
                $('#noticeinfo').text(data.info);
                $('#myModal').modal('show');
            }
        })


    }

    function myGod(id, w, n) {
        var box = document.getElementById(id), can = true, w = w || 1500, fq = fq || 10, n = n == -1 ? -1 : 1;
        box.innerHTML += box.innerHTML;
        box.onmouseover = function () {
            can = false
        };
        box.onmouseout = function () {
            can = true
        };
        var max = parseInt(box.scrollHeight / 2);
        new function () {
            var stop = box.scrollTop % 18 == 0 && !can;
            if (!stop) {
                var set = n > 0 ? [max, 0] : [0, max];
                box.scrollTop == set[0] ? box.scrollTop = set[1] : box.scrollTop += n;
            }
            ;
            setTimeout(arguments.callee, box.scrollTop % 18 ? fq : w);
        };
    };
    myGod('div4', 1500);
</script>
</html>
